package acm.pta5;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class T1_2 {
    public static void main(String[] args) throws IOException, ParseException {
        BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
        String read = in.readLine();
        SimpleDateFormat format=new SimpleDateFormat("MM-dd-yyyy");
        Date date = format.parse(read);
        SimpleDateFormat to = new SimpleDateFormat("yyyy-MM-dd");
        System.out.println(to.format(date));
    }
}
